<template>
    <div class="app-container">
        <!-- 搜索 -->
        <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
            <el-form-item label="产品名称" prop="productName">
                <el-input v-model="queryParams.productName" placeholder="请输入产品名称" clearable style="width: 240px"
                    @keyup.enter.native="handleQuery" />
            </el-form-item>
            <el-form-item label="叶片类型" prop="bladeType">
                <el-select v-model="queryParams.bladeType" placeholder="请选择叶片类型">
                    <el-option v-for="dict in dict.type.sye_product_blade" :key="dict.label" :label="dict.label"
                        :value="dict.value"></el-option>
                </el-select>
            </el-form-item>
            <el-form-item label="驱动方式" prop="driveMode">
                <el-select v-model="queryParams.driveMode" placeholder="请选择驱动方式">
                    <el-option v-for="dict in dict.type.sys_product_drive" :key="dict.label" :label="dict.label"
                        :value="dict.value"></el-option>
                </el-select>
            </el-form-item>
            <input hidden />
            <el-form-item>
                <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
                <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
            </el-form-item>
        </el-form>
        <el-row :gutter="10" class="mb8">
            <el-col :span="1.5">
                <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAddProducts"
                    v-hasPermi="['resource:product:add']">添加产品</el-button>
            </el-col>
            <el-col :span="1.5">
                <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple"
                    @click="handleDelete" v-hasPermi="['resource:product:remove']">删除</el-button>
            </el-col>
            <right-toolbar :showSearch.sync="showSearch" @queryTable="getDataList"></right-toolbar>
        </el-row>
        <!-- 表格 -->
        <el-table v-loading="loading" :data="dataList" @selection-change="handleSelectionChange">
            <el-table-column type="selection" width="55" align="center" />
            <el-table-column label="ID" prop="id" width="60" />
            <el-table-column label="产品名称" prop="productName" width="140" />
            <el-table-column label="叶片类型" prop="bladeType" width="100" />
            <el-table-column label="驱动方式" prop="driveMode" width="100" />
            <el-table-column label="生产工序 " prop="processFlag" width="140">
                <template slot-scope="scope">
                    {{ getname(scope.row) }}
                </template>
            </el-table-column>

            <el-table-column label="最小起订量" align="center" prop="areasBoundary" width="160" />
            <el-table-column label="价格" prop="price" />
            <el-table-column label="预警价格" prop="priceWarn" />
            <el-table-column label="安装尺寸(+mm)" prop="sizeAdd" />
            <el-table-column label="减尺尺寸宽(-mm)" prop="sizeSubWidth" />
            <el-table-column label="减尺尺寸高(-mm)" prop="sizeSubHeight" />
            <el-table-column label="玻璃数量(单位/块)" prop="glassCount" width="140">
                <template slot-scope="scope">
                    <span v-for="item in scope.row.glassCount" :key="item">
                        {{ item + '块' }}
                    </span>
                </template>
            </el-table-column>
            <el-table-column label="表头" prop="tableName" />
            <el-table-column label="批次编号组 " prop="batchType" width="140">
                <template slot-scope="scope">
                    <!-- {{ dict.type.sys_batch_number_group.find((item) => scope.row.batchType == item.value).label }} -->
                    {{ getStatus(scope.row) }}
                </template>
            </el-table-column>
            <el-table-column label="操作" align="center" width="220" class-name="small-padding fixed-width" fixed="right">
                <template slot-scope="scope">

                    <el-button size="mini" type="text" @click="handleCans(scope.row)"
                        v-hasPermi="['resource:product:param:setting']">设置参数</el-button>
                    <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
                        v-hasPermi="['resource:product:edit']">修改</el-button>
                    <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
                        v-hasPermi="['resource:product:remove']">删除</el-button>
                </template>
            </el-table-column>
        </el-table>
        <!-- 分页 -->
        <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
            :limit.sync="queryParams.pageSize" @pagination="getDataList" />

        <el-dialog title="产品详情" :visible.sync="showopen" width="700px" append-to-body>
            <el-form ref="form" :model="form" :rules="rules" size="medium" label-width="140px">
                <el-form-item label="产品名称" prop="productName">
                    <el-input v-model="form.productName" placeholder="请输入产品名称" clearable>
                    </el-input>
                </el-form-item>
                <el-row>
                    <el-form-item label="叶片类型" prop="bladeType">
                        <el-select v-model="form.bladeType" placeholder="请选择叶片类型">
                            <el-option v-for="dict in dict.type.sye_product_blade" :key="dict.label" :label="dict.label"
                                :value="dict.value"></el-option>
                        </el-select>
                    </el-form-item>
                    <el-form-item label="驱动方式" prop="driveMode">
                        <el-select v-model="form.driveMode" placeholder="请选择驱动方式">
                            <el-option v-for="dict in dict.type.sys_product_drive" :key="dict.label" :label="dict.label"
                                :value="dict.value"></el-option>
                        </el-select>
                    </el-form-item>


                </el-row>
                <el-form-item label="最小起订量" prop="areasBoundary">
                    <el-input type="number" v-model="form.areasBoundary" placeholder="请输入最小起订量" clearable>
                    </el-input>
                </el-form-item>
                <el-form-item label="价格" prop="price">
                    <el-input type="number" v-model="form.price" placeholder="请输入价格" clearable>
                        <template slot="append">元</template>
                    </el-input>
                </el-form-item>
                <el-form-item label="预警价格" prop="priceWarn">
                    <el-input type="number" v-model="form.priceWarn" placeholder="请输入预警价格" clearable>
                        <template slot="append">元</template>
                    </el-input>
                </el-form-item>
                <el-form-item label="安装尺寸(+mm)" prop="sizeAdd">
                    <el-input type="number" v-model="form.sizeAdd" placeholder="请输入安装尺寸" clearable>
                        <template slot="append">mm</template>
                    </el-input>
                </el-form-item>
                <el-form-item label="减尺尺寸(-mm)" prop="sizeSub">
                    <el-input type="number" v-model="form.sizeSub" placeholder="请输入减尺尺寸" clearable>
                        <template slot="append">mm</template>
                    </el-input>
                </el-form-item>
                <el-form-item label="玻璃数量(单位/块)" prop="glassCountList">
                    <el-checkbox-group v-model="form.glassCountList" @change="blchange">
                        <el-checkbox v-for="(item, index) in bllist" :key="index" :label="item">{{ item + '块'
                            }}</el-checkbox>
                    </el-checkbox-group>
                </el-form-item>
                <el-form-item label="表头" prop="tableName">
                    <el-input type="text" v-model="form.tableName" placeholder="请输入表头" clearable>
                    </el-input>
                </el-form-item>
                <el-form-item label="批次编号组" prop="batchType">
                    <el-select v-model="form.batchType" placeholder="请选择批次编号组">
                        <el-option v-for="dict in dict.type.sys_batch_number_group" :key="dict.label"
                            :label="dict.label" :value="dict.value"></el-option>
                    </el-select>
                </el-form-item>

            </el-form>
            <div slot="footer">
                <el-button @click="cancel">取消</el-button>
                <el-button type="primary" @click="submitForm">确定</el-button>
            </div>
        </el-dialog>


        <!-- 添加或编辑弹框 -->
        <el-dialog :title="addDialogTitle" :visible.sync="addDialogVisible" width="700px" append-to-body>
            <el-form ref="form" :model="form" :rules="rules" size="medium" label-width="140px">
                <el-form-item label="产品名称" prop="productName">
                    <el-input v-model="form.productName" placeholder="请输入产品名称" clearable>
                    </el-input>
                </el-form-item>
                <el-row>
                    <el-form-item label="叶片类型" prop="bladeType">
                        <el-select v-model="form.bladeType" placeholder="请选择叶片类型">
                            <el-option v-for="dict in dict.type.sye_product_blade" :key="dict.label" :label="dict.label"
                                :value="dict.value"></el-option>
                        </el-select>
                    </el-form-item>
                    <el-form-item label="驱动方式" prop="driveMode">
                        <el-select v-model="form.driveMode" placeholder="请选择驱动方式">
                            <el-option v-for="dict in dict.type.sys_product_drive" :key="dict.label" :label="dict.label"
                                :value="dict.value"></el-option>
                        </el-select>
                    </el-form-item>
                </el-row>
                <el-form-item label="最小起订量" prop="areasBoundary">
                    <el-input type="number" v-model="form.areasBoundary" placeholder="请输入最小起订量" clearable>
                    </el-input>
                </el-form-item>
                <el-form-item label="价格" prop="price">
                    <el-input type="number" v-model="form.price" placeholder="请输入价格" clearable>
                        <template slot="append">元</template>
                    </el-input>
                </el-form-item>
                <el-form-item label="预警价格" prop="priceWarn">
                    <el-input type="number" v-model="form.priceWarn" placeholder="请输入预警价格" clearable>
                        <template slot="append">元</template>
                    </el-input>
                </el-form-item>
                <el-form-item label="安装尺寸(+mm)" prop="sizeAdd">
                    <el-input type="number" v-model="form.sizeAdd" placeholder="请输入安装尺寸" clearable>
                        <template slot="append">mm</template>
                    </el-input>
                </el-form-item>
                <el-form-item label="减尺尺寸宽(-mm)" prop="sizeSubWidth">
                    <el-input type="number" v-model="form.sizeSubWidth" placeholder="请输入减尺尺寸" clearable>
                        <template slot="append">mm</template>
                    </el-input>
                </el-form-item>
                <el-form-item label="减尺尺寸高(-mm)" prop="sizeSubHeight">
                    <el-input type="number" v-model="form.sizeSubHeight" placeholder="请输入减尺尺寸" clearable>
                        <template slot="append">mm</template>
                    </el-input>
                </el-form-item>

                <el-form-item label="玻璃数量(单位/块)" prop="glassCountList">
                    <el-checkbox-group v-model="form.glassCountList" @change="blchange">
                        <el-checkbox v-for="(item, index) in bllist" :key="index" :label="item">{{ item + '块'
                            }}</el-checkbox>
                    </el-checkbox-group>
                </el-form-item>
                <el-form-item label="表头" prop="tableName">
                    <el-input type="text" v-model="form.tableName" placeholder="请输入表头" clearable>
                    </el-input>
                </el-form-item>
                <el-form-item label="批次编号组" prop="batchType">
                    <el-select v-model="form.batchType" placeholder="请选择批次编号组">
                        <el-option v-for="dict in dict.type.sys_batch_number_group" :key="dict.label"
                            :label="dict.label" :value="dict.value"></el-option>
                    </el-select>
                </el-form-item>
                <el-form-item label="生产工序" prop="processFlag">
                    <el-select style="width: 100%;" v-model="form.processFlag" multiple placeholder="请选择生产工序" clearable>
                        <el-option v-for="item in dict.type.self_production_process" :key="item.dictValue"
                            :label="item.label" :value="item.value"></el-option>
                    </el-select>
                </el-form-item>
            </el-form>
            <div slot="footer">
                <el-button @click="cancel">取消</el-button>
                <el-button type="primary" @click="submitForm">确定</el-button>
            </div>
        </el-dialog>
        <!-- 设置参数 -->
        <el-dialog title="设置参数" :visible.sync="setparam" width="1400px" append-to-body>
            <el-form ref="formParameterRef" :model="formParameter" :rules="formParameterrules" size="medium">
                <el-table tooltip-effect="light" :data="formParameter.paramList" height="520">
                    <el-table-column label="参数名字" prop="name">
                        <template slot-scope="scope">
                            <el-form-item size="mini" :prop="'paramList.' + scope.$index + '.name'"
                                :rules="formParameterrules.name" class="all">
                                <el-select v-model="scope.row.name" placeholder="请选择" filterable value-key="id"
                                    @change="pestChange($event, scope.$index)" width="200">
                                    <el-option v-for="its in plist" :key="its.id" :label="its.name" :value="its">
                                    </el-option>
                                </el-select>
                            </el-form-item>
                        </template>
                    </el-table-column>

                    <el-table-column label="表单名">
                        <template slot-scope="scope">
                            <el-form-item size="mini" :prop="'paramList.' + scope.$index + '.paramNameAlias'"
                                :rules="formParameterrules.paramNameAlias" class="all" v-if="scope.row.p1show">
                                <el-input width="120" v-model="scope.row.paramNameAlias" placeholder="请输入">
                                </el-input>
                            </el-form-item>
                        </template>
                    </el-table-column>

                    <el-table-column label="排序" width="100">
                        <template slot-scope="scope">
                            <el-form-item size="mini" :prop="'paramList.' + scope.$index + '.sort'"
                                :rules="formParameterrules.sort" class="all" v-if="scope.row.p1show">
                                <el-input width="100" v-model="scope.row.sort" placeholder="请输入" type="number">
                                </el-input>
                            </el-form-item>
                        </template>
                    </el-table-column>

                    <el-table-column label="公式" width="160">
                        <template slot-scope="scope">
                            <div class="notext">
                                {{ scope.row.formula }}
                            </div>
                        </template>
                    </el-table-column>
                    <el-table-column label="公式说明" width="400">
                        <template slot-scope="scope">
                            <div class="notext">
                                {{ scope.row.formulaDesc }}
                            </div>
                        </template>
                    </el-table-column>
                    <el-table-column label="系数p(p1)" width="120">
                        <template slot-scope="scope">
                            <el-form-item size="mini" :prop="'paramList.' + scope.$index + '.p1'"
                                :rules="formParameterrules.p1" class="all" v-if="scope.row.p1show">
                                <el-input v-model="scope.row.p1" placeholder="请输入" type="number">
                                </el-input>
                            </el-form-item>
                        </template>
                    </el-table-column>
                    <el-table-column label="系数2(p2)" width="120">
                        <template slot-scope="scope">
                            <el-form-item size="mini" :prop="'paramList.' + scope.$index + '.p2'"
                                :rules="formParameterrules.p2" class="all" v-if="scope.row.p2show">
                                <el-input v-model="scope.row.p2" placeholder="请输入" type="number">
                                </el-input>
                            </el-form-item>

                        </template>
                    </el-table-column>
                    <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right"
                        width="150">
                        <template slot-scope="scope">
                            <el-button size="mini" type="text" icon="el-icon-edit" @click="handleaddCanshu(scope.row)"
                                v-hasPermi="['system:order:edit']">增加</el-button>
                            <el-button size="mini" type="text" icon="el-icon-delete"
                                @click="handleDeleteCanshu(scope.$index)"
                                v-hasPermi="['system:order:remove']">删除</el-button>
                        </template>
                    </el-table-column>
                </el-table>
            </el-form>
            <div slot="footer">
                <el-button @click="cancel">取消</el-button>
                <el-button type="primary" @click="submitFormParameter">确定</el-button>
            </div>
        </el-dialog>
    </div>
</template>

<script>
// 快递平台管理
import { getList, getInfo, addList, editList, removeList, parameterList, setParameter, parameterInfo } from '@/api/goods'
import { number } from 'echarts';
export default {
    name: 'CustomerList',
    dicts: ['sys_product_color', 'sye_product_blade', 'sys_product_drive', 'sys_batch_number_group', 'self_batch_status', 'self_production_process'],
    data() {
        return {
            // 遮罩层
            loading: true,
            // 选中数组
            ids: [],
            // 非单个禁用
            single: true,
            // 非多个禁用
            multiple: true,
            // 显示搜索条件
            showSearch: true,
            // 总条数
            total: 0,
            // 查询参数
            queryParams: {
                pageNum: 1,
                pageSize: 10,
                productName: undefined, // 平台名字
                bladeType: undefined, // 平台编号
                driveMode: undefined,
                price: undefined, // 平台编号
                priceWarn: undefined, // 平台编号
                tableName: undefined,
                batchType: undefined,

            },
            // 数据列表
            dataList: [],
            // 生产角色下所有用户列表
            scUserList: [],
            // 添加弹框标题
            addDialogTitle: '',
            // 添加弹框是否显示
            addDialogVisible: false,
            setparam: false,
            // 添加弹框表单参数
            form: {
                glassCountList: [],
            },
            // 添加弹框表单校验
            rules: {
                productName: [{ required: true, message: '请输入产品名称', trigger: 'blur' }],
                bladeType: [{ required: true, message: '请选择叶片类型', trigger: 'blur' }],
                driveMode: [{ required: true, message: '请选择驱动方式', trigger: 'blur' }],
                areasBoundary: [{ required: true, message: '请输入最小起订量', trigger: 'blur' }],
                price: [{ required: true, message: '请输入价格', trigger: 'blur' }],
                priceWarn: [{ required: true, message: '请输入预警价格', trigger: 'blur' }],
                sizeAdd: [{ required: true, message: '请输入安装尺寸', trigger: 'blur' }],
                sizeSubWidth: [{ required: true, message: '请输入减尺尺寸宽', trigger: 'blur' }],
                sizeSubHeight: [{ required: true, message: '请输入减尺尺寸高', trigger: 'blur' }],
                glassCountList: [{ required: true, message: '请选择玻璃数量单位', trigger: 'blur' }],
                tableName: [{ required: true, message: '请输入表头', trigger: 'blur' }],
                batchType: [{ required: true, message: '请选择批次编号组', trigger: 'blur' }],
                processFlag: [{ required: true, message: '请选择生产工序', trigger: 'change' }],


            },
            dateRange: [],
            bllist: [],
            isStatus: false,
            plist: [],
            formParameter: {
                id: '',
                productName: '',
                paramList: []
            },
            formParameterrules: {
                name: [{ required: true, message: '请选择参数', trigger: 'change' }],
                p1: [{ required: true, message: '请输入', trigger: 'blur' }],
                p2: [{ required: true, message: '请输入', trigger: 'blur' }]
            },
            showopen: false
        }
    },
    created() {
        this.getDataList()
        this.getbl()
        parameterList().then(res => {
            console.log(res);
            this.plist = res.data
        })
    },
    computed: {
        getname() {
            return (data) => {
                if (data.processFlag) {
                    let nameList = ''
                    let nowlist = data.processFlag.split(',')
                    console.log(nowlist, this.dict.type.self_production_process);
                    nameList = this.dict.type.self_production_process.filter(item => {
                        if (nowlist.find(value => value == item.value)) { return item.label }
                    }).map(item => { return item.label }).join(',')
                    console.log(nameList);
                    return nameList
                }else{
                    return '未设置生产工序'

                }
            }
        },
        getStatus() {
            return (data) => {
                let batchType = ''
                this.dict.type.sys_batch_number_group.forEach(item => {
                    if (item.value == data.batchType) {
                        batchType = item.label
                    }
                });
                return batchType
            }
        }
    },

    methods: {

        getbl() {
            this.getConfigKey("bl").then(response => {
                for (let i = 0; i <= response.msg; i++) {
                    this.bllist.push(i)
                }
            });
        },
        blchange(e) {
            this.form.glassCountList = e
            this.form.glassCountList.sort((a, b) => a - b);
        },
        /** 查询列表 */
        getDataList() {
            this.queryParams.beginTime = this.dateRange[0];
            this.queryParams.endTime = this.dateRange[1];
            this.loading = true
            getList(this.queryParams).then((response) => {
                this.dataList = response.rows
                this.dataList.forEach(item => {
                    item.glassCount = JSON.parse(item.glassCount);
                });
                this.total = response.total
                this.loading = false
            })
        },
        // 取消按钮
        cancel() {
            this.addDialogVisible = false;
            this.setparam = false;

            // this.reset();
        },
        reset() {
            this.form = {
                productName: "",
                bladeType: "",
                driveMode: "",
                areasBoundary: "",
                price: "",
                priceWarn: "",
                sizeAdd: "",
                sizeSubWidth: "",
                sizeSubHeight: "",
                glassCount: "",
                glassCountList: []
            };
            this.resetForm("form");
        },
        /** 搜索按钮操作 */
        handleQuery() {
            this.queryParams.pageNum = 1
            this.getDataList()
        },
        /** 重置按钮操作 */
        resetQuery() {
            this.dateRange = [];
            this.resetForm('queryForm')
            this.handleQuery()
        },
        /** 多选框选中数据 */
        handleSelectionChange(selection) {
            this.ids = selection.map((item) => item.id)
            this.single = selection.length != 1
            this.multiple = !selection.length
        },
        handleAddProducts() {
            this.reset();
            this.form.glassCountList = []
            this.isStatus = false
            this.addDialogTitle = '添加产品'
            this.addDialogVisible = true
        },

        handleUpdate(row) {
            this.reset();
            getInfo({ id: row.id }).then((response) => {
                this.form = response.data;
                if (response.data.processFlag) {
                    this.form.processFlag = response.data.processFlag.split(',')
                }
                this.$set(this.form, 'glassCountList', JSON.parse(this.form.glassCount))
                this.isStatus = true;
                this.addDialogVisible = true;
                this.addDialogTitle = "修改产品信息";
            });
        },
        /** 删除按钮操作 */
        handleDelete(row) {
            let userIds = row.id || this.ids;
            if (typeof userIds == "number") {
                userIds = [userIds];
            }
            this.$modal
                .confirm('是否确认删除ID为"' + userIds + '"的数据项？')
                .then(function () {
                    return removeList({ ids: userIds });
                })
                .then(() => {
                    this.getDataList();
                    this.$modal.msgSuccess("删除成功");
                })
                .catch(() => { });
        },
        /** 提交按钮 */
        submitForm: function () {
            this.form.glassCount = JSON.stringify(this.form.glassCountList);
            console.log(this.form);
            this.$refs["form"].validate((valid) => {
                this.form.processFlag = this.form.processFlag.join(',')
                if (valid) {
                    if (this.isStatus) {
                        editList(this.form).then((response) => {
                            this.$modal.msgSuccess("修改成功");
                            this.cancel()
                            this.getDataList();
                        });
                    } else {

                        addList(this.form).then((response) => {
                            this.$modal.msgSuccess("新增成功");
                            this.cancel()
                            this.getDataList();
                        });
                    }
                }
            });
        },
        handleCans(row) {
            parameterInfo({ id: row.id }).then(res => {
                this.formParameter.paramList = []
                if (res.data.length == 0) {
                    this.formParameter.paramList.push({
                        paramId: '',
                        name: '',
                        formula: '',
                        formulaDesc: '',
                        p1: '',
                        p2: ''
                    })
                    this.formParameter.id = row.id
                    this.formParameter.productName = row.productName
                    this.setparam = true
                } else {
                    let list = []
                    list = res.data
                    list.forEach((item, index) => {
                        const as = this.plist.filter(pitem => { return item.paramId == pitem.id })
                        item.name = as[0].name
                        if (as[0].pc == 0) {
                            list[index].p1show = false
                            list[index].p2show = false
                        } else if (as[0].pc == 1) {
                            list[index].p1show = true
                            list[index].p2show = false
                        } else {
                            list[index].p1show = true
                            list[index].p2show = true
                        }
                    })
                    this.$set(this.formParameter, 'paramList', list)
                    this.formParameter.id = row.id
                    this.formParameter.productName = row.productName
                    this.setparam = true
                }

            })

        },
        pestChange(e, index) {
            let data = this.formParameter.paramList[index]
            Object.keys(data).forEach(key => {
                data[key] = e[key]
            })
            this.formParameter.paramList[index].paramId = e.id
            if (e.pc == 0) {
                this.formParameter.paramList[index].p1show = false
                this.formParameter.paramList[index].p2show = false
            } else if (e.pc == 1) {
                this.formParameter.paramList[index].p1show = true
                this.formParameter.paramList[index].p1 = 0
                this.formParameter.paramList[index].p2show = false
            } else {
                this.formParameter.paramList[index].p1show = true
                this.formParameter.paramList[index].p1 = 0
                this.formParameter.paramList[index].p2show = true
                this.formParameter.paramList[index].p2 = 0
            }
        },
        handleaddCanshu() {
            this.formParameter.paramList.push({
                paramId: '',
                name: '',
                formula: '',
                formulaDesc: '',
                p1: 0,
                p2: 0
            })
        },
        // 删除产品
        handleDeleteCanshu(index) {
            this.$confirm('此操作将永久删除该产品信息, 是否继续?', '提示', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                type: 'warning'
            }).then(() => {
                this.$message({
                    type: 'success',
                    message: '删除成功!'
                });
                this.formParameter.paramList.splice(index, 1)
            }).catch(() => {
                this.$message({
                    type: 'info',
                    message: '已取消删除'
                });
            });

        },
        submitFormParameter: function () {
            this.$refs.formParameterRef.validate((valid) => {
                if (valid) {
                    setParameter(this.formParameter).then((response) => {
                        this.$modal.msgSuccess("设置成功");
                        this.setparam = false;
                    });
                }
            });
        },
        handleEYe(row) {
            this.showopen = true
        }
    },
}
</script>

<style lang="scss" scoped>
.notext {
    height: 28px;
    line-height: 28px;
    margin-bottom: 18px;
}
</style>